
<html>
<head>
<script language="javascript">
	/*function checkpass(){

	if(document.getElementById("newpassword").value!=document.getElementById("repnewpassword").value)
{
	alert("Passwords do not match.. Re-enter again...");
	}
}*/

function checkPass()
{

    var pass1 = document.getElementById('newpassword');
    var pass2 = document.getElementById('repnewpassword');
    var message = document.getElementById('confirmMessage');

    var goodColor = "#66cc66";
    var badColor = "#ff6666";

    if(pass1.value == pass2.value){ 
        pass2.style.backgroundColor = goodColor;
        message.style.color = goodColor;
        message.innerHTML = "Passwords Match!"
		document.cpform.action="ChangePassword";
    }else{
        pass2.style.backgroundColor = badColor;
        message.style.color = badColor;
        message.innerHTML = "Passwords Do Not Match!";
    }
}  

</script>
</head>
<div id="b"><p><a href="/QSS/view/UserHome.jsp"><font color=#4682B4>Home</font></a></p></div>
<%-- <%System.out.println(request.getSession().getAttribute("userID")); --%>
<!--  %> -->
<div id="e">
<p><a href="/QSS/view/Logout.jsp"><font color=#4682B4>Logout</font></a></p></div>
<div id="d">
<body bgcolor="#CCCCCC"><br>
<br><h1 align="center">${message}</h1></br>
<br><br>
<br>
<br>
<form method="post" id="cpform" name="cpform">
<table border="1" align="center" bgcolor="#66CCCC" frame="box">
<th align="center" colspan="2">Change Password</th>
<tr>
   
   <td>Old Password:</td><td><input type="password" id="password" name="password"></td></tr>
  <tr><td><div class="fieldWrapper">
            <label for="newpassword">Password:</label>
      </td> 
  <td><input type="password" name="newpassword" id="newpassword" keyev="true" style="; padding-right: 0px; background-attachment: scroll; background-position: 100% 50%; background-repeat: no-repeat no-repeat;">
        </div></td>
        </tr><tr>
        <td><div class="fieldWrapper">
            <label for="repnewpassword">Confirm Password:</label></td>
           <td> <input type="password" name="repnewpassword" id="repnewpassword" onkeyup="checkPass(); return false;" keyev="true" style=" padding-right: 0px; background-attachment: scroll; background-position: 100% 50%; background-repeat: no-repeat no-repeat;"></td><td>
           
            <span id="confirmMessage" class="confirmMessage"></span>
        </div>
        </td></tr>
<tr><td colspan="2" align="center">
<input type="submit" value="submit" />
</td></tr>
</table>
</form>
</body>
</html>
<!-- <html>
<head>
<script language="javascript">
	/*function checkpass(){

	if(document.getElementById("newpassword").value!=document.getElementById("repnewpassword").value)
{
	alert("Passwords do not match.. Re-enter again...");
	}
}*/

function checkPass()
{

    var pass1 = document.getElementById('newpassword');
    var pass2 = document.getElementById('repnewpassword');
    var message = document.getElementById('confirmMessage');

    var goodColor = "#66cc66";
    var badColor = "#ff6666";

    if(pass1.value == pass2.value){ 
        pass2.style.backgroundColor = goodColor;
        message.style.color = goodColor;
        message.innerHTML = "Passwords Match!"
    }else{
        pass2.style.backgroundColor = badColor;
        message.style.color = badColor;
        message.innerHTML = "Passwords Do Not Match!";
    }
}  

</script>
</head>
<body>
<br>${message}</br>
<form action="ChangePassword" method="post">
Old Password:<input type="password" id="password" name="password"><br><br>
  <div class="fieldWrapper">
            <label for="newpassword">Password:</label>
            <input type="password" name="newpassword" id="newpassword" keyev="true" style="; padding-right: 0px; background-attachment: scroll; background-position: 100% 50%; background-repeat: no-repeat no-repeat;">
        </div>
        <div class="fieldWrapper">
            <label for="repnewpassword">Confirm Password:</label>
            <input type="password" name="repnewpassword" id="repnewpassword" onkeyup="checkPass(); return false;" keyev="true" style=" padding-right: 0px; background-attachment: scroll; background-position: 100% 50%; background-repeat: no-repeat no-repeat;">
            <span id="confirmMessage" class="confirmMessage"></span>
        </div>
<input type="submit" value="submit">
</form>
</body>
</html>-->